USE [QLLVANTAI]
GO
/****** Object:  StoredProcedure [dbo].[sp_ThemXeVaoLich]    Script Date: 10/16/2013 15:58:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[sp_ThemXeVaoLich]
	@malich int,@maxe int,@taixe int,@phulai int,@taixetrong int,@phulaitrong int,
	@loai int
as
	if(@loai = 1)
	--update ChiTietLich set So_TaiXe = @taixe, So_PhuLai = @phulai, So_TaiXeTrong = @taixetrong, So_PhuLaiTrong = @phulaitrong where Ma_VanChuyen = @malich
	BEGIN
		
		insert into ChiTietLich values(@malich,@maxe,@taixe,@phulai,@taixetrong,@phulaitrong)
	END